package utfpr.gang5.hermes.controledepresenca.cliente;

import java.rmi.Naming;

import utfpr.gang5.hermes.controledepresenca.rmi.ControlePresencaService;

public abstract class RmiServiceFactory {
	private static ControlePresencaService service = null;
	
	public static ControlePresencaService getService() {
		if (service == null)
			try {
				return (ControlePresencaService) Naming.lookup( "rmi://localhost/ControlePresencaService" );
			} catch (Exception e) {
				e.printStackTrace();
			} 
		
		return service;
	}
	
	
}
